﻿package org.leles.aom.objects 
{
	import flash.events.EventDispatcher;
	import org.leles.aom.Activity;
	
	/**
	 * ...
	 * @author Bruno Leles
	 */
	public class Users extends ActivityObject
	{
		
		protected var _me:User;
		protected var _inviter:User;
		
		public function Users(activity:Activity = null) 
		{
			super(activity);
			_me			= new User(activity, 'Me');
			_inviter	= new User(activity, 'Inviter');
		}
		
		public function item(index:uint):User 
		{
			if ( index > count ) 
				return null;
			return new User(activity, index);
		}
		
		public function get me():User{ return _me; }
		public function get count():int{ return parseInt( activity.callDriverMethod("Users_Count") ); }
		public function get inviter():User{ return _inviter; }
		
	}

}